import request from '@/utils/request'

export default {
  /**
   * 讲师列表接口：
   * @param {*} current:当前页
   * @param {*} limit：每页显示条数
   * @param {*} teacherQuery：查询对象
   */
  getTeacherList(current, limit, teacherQuery) {
    return request({
      url: `/eduservice/teacher/pageTeacher/${current}/${limit}`,
      method: 'post',
      data: teacherQuery
    })
  },

  /**
   * 根据id删除：
   * @param {*} id
   */
  delTeacher(id) {
    return request({
      url: `/eduservice/teacher/del/${id}`,
      method: 'delete'
    })
  },

  /**
   * 添加讲师：
   * @param {*} teacher
   */
  saveTeacher(teacher) {
    return request({
      url: '/eduservice/teacher/addTeacher',
      method: 'post',
      data: teacher
    })
  },

  /**
   * 修改讲师信息
   * @param {*} teacher
   */
  updateTeacherInfo(teacher) {
    return request({
      url: '/eduservice/teacher/update',
      method: 'post',
      data: teacher
    })
  }
}

// export function getList(params) {
//   return request({
//     url: '/table/list',
//     method: 'get',
//     params
//   })
// }
